-- GENERATED SPELL FOR [Sundered Spirit] --


function spell0_22912(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22912', 18000, 1)
end

function spell1_22912(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22912', 3000, 1)
end

function Sorts_22912(pUnit, Event)
local choix_sorts_22912 = math.random(0, 1)
if choix_sorts_22912 == 0 then
pUnit:RegisterEvent('spell0_22912', 1, 1)
end
if choix_sorts_22912 == 1 then
pUnit:RegisterEvent('spell1_22912', 1, 1)
end
end

function mob22912_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22912', math.random(1500, 3000), 1)
end

function mob22912_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22912_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22912_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22912, 1, 'mob22912_Action')
RegisterUnitEvent(22912, 2, 'mob22912_Leave')
RegisterUnitEvent(22912, 3, 'mob22912_Kill')
RegisterUnitEvent(22912, 4, 'mob22912_Die')
